﻿#region Using Directives

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    using Csla;

    using MarketPulse.Reporting.Core;

#endregion

namespace MarketPulse.Reporting.Core.Criteria
{
    /// <summary>
    /// Criteria class that specifies the criteria used when constructing and populating a Results object.
    /// </summary>
    [Serializable]
    public class DashboardReportCriteria : CriteriaBase<DashboardReportCriteria>
    {

        #region Constructors

            /// <summary>
            /// Criteria used by the [uspYTDScoresSummary] -- ReportingMcDonalds_Dev
            /// </summary>
            /// <param name="branchGUIDList"></param> Comma delimited list of branch guids from reportilng level selected branches/companies
            /// <param name="ytdAsOfDate"></param>
            /// <param name="languageCode"></param>
            /// <param name="published"></param>
            public DashboardReportCriteria(string branchGUIDList, DateTime? ytdAsOfDate, string languageCode, bool? published)
            {
                BranchGUIDList = branchGUIDList;
                AsOfDate = ytdAsOfDate;
                LanguageCode = languageCode;
                Published = published;
            }

            /// <summary>
            /// Criteria used by the [uspTTMScoreTrending]  -- ReportingMcDonalds_Dev
            /// </summary>
            /// <param name="branchGUIDList"></param> Comma delimited list of branch guids from reportilng level selected branches/companies
            /// <param name="asOfDate"></param>
            /// <param name="languageCode"></param>
            /// <param name="published"></param>
            /// <param name="excludeDecember"></param>
            public DashboardReportCriteria(string branchGUIDList, DateTime? asOfDate, string languageCode, bool? published, bool? excludeDecember)
            {
                BranchGUIDList = branchGUIDList;
                AsOfDate = asOfDate;
                LanguageCode = languageCode;
                Published = published;
                ExcludeDecember = excludeDecember;
            }

        #endregion

        #region Properties

            /// <summary>
            /// The BranchGUIDList associated with this criteria object.
            /// </summary>
            public static PropertyInfo<string> BranchGUIDListProperty = RegisterProperty<string>(p => p.BranchGUIDList);
            public string BranchGUIDList
            {
                get { return ReadProperty(BranchGUIDListProperty); }
                private set { LoadProperty(BranchGUIDListProperty, value); }
            }

            /// <summary>
            /// The AsOfDate associated with this criteria object.
            /// </summary>
            public static PropertyInfo<Nullable<DateTime>> AsOfDateProperty = RegisterProperty<Nullable<DateTime>>(p => p.AsOfDate);
            public Nullable<DateTime> AsOfDate
            {
                get { return ReadProperty(AsOfDateProperty); }
                private set { LoadProperty(AsOfDateProperty, value); }
            }

            /// <summary>
            /// This is the LanguageCode identifier (ie. en or fr) to use when localising text from the database.
            /// </summary>
            public static PropertyInfo<string> LanguageCodeProperty = RegisterProperty<string>(p => p.LanguageCode);
            public string LanguageCode
            {
                get { return ReadProperty(LanguageCodeProperty); }
                private set { LoadProperty(LanguageCodeProperty, value); }
            }

            /// <summary>
            /// The Published associated with this criteria object.
            /// </summary>
            public static PropertyInfo<bool?> PublishedProperty = RegisterProperty<bool?>(p => p.Published);
            public bool? Published
            {
                get { return ReadProperty(PublishedProperty); }
                private set { LoadProperty(PublishedProperty, value); }
            }

            /// <summary>
            /// The ExcludeDecember associated with this criteria object.
            /// </summary>
            public static PropertyInfo<bool?> ExcludeDecemberProperty = RegisterProperty<bool?>(p => p.ExcludeDecember);
            public bool? ExcludeDecember
            {
                get { return ReadProperty(ExcludeDecemberProperty); }
                private set { LoadProperty(ExcludeDecemberProperty, value); }
            }

        #endregion

    }
}
